<template>
  <div class="message">
    <v-header :back-display="false">
      <div slot="title">个人信息</div>
    </v-header>

    <div class="msgbox">
      <div class="msg-item clearfix" v-for="(item,index) in msglist" :key="index" @click="selectItem(item)">
        <div class="item-img">
          <img :src="item.img" alt="">
        </div>
        <div class="item-txt">
          <div class="txt-top clearfix">
            <div class="top-left">{{item.worker}}</div>
            <div class="top-right">
              <p>{{item.time}}</p>
              <img src="../../assets/right.png" alt="">
            </div>
          </div>
          <div class="txt-bottom">
            <p class="clamp2">{{item.detail}}</p>
          </div>
        </div>
      </div>
    </div>


  </div>
</template>

<script>
import header from '@/components/main/header'

export default {
  name: 'message',
  components:{
    "v-header":header
  },
  data () {
    return {
      msglist:[
        {id:1,img:require('../../assets/tab_me1.png'),worker:'管理员',time:'2020-4-1',detail:'你的国家奖学金申请审核流程已结束，审核通过你的国家奖学金申请审核流程已结束，审核通过'},
        {id:2,img:require('../../assets/qq.png'),worker:'前端',time:'2020-4-1',detail:'你的国家奖学金申请审核流程已结束，审核通过你的国家奖学金申请审核流程已结束，审核通过'},
        {id:3,img:require('../../assets/wx.png'),worker:'后端',time:'2020-4-1',detail:'你的国家奖学金申请审核流程已结束，审核通过你的国家奖学金申请审核流程已结束，审核通过'},
      ]
    }
  },
  created () {
  },
  computed: {},
  methods: {
    selectItem(item){
      this.$router.push({ path:`/message/${item.id}` })
    }
  },
  mounted () {
  }
}
</script>

<style lang="less" scoped>
.msgbox{
  padding: 20px 20px 0;
  .msg-item{
    margin-bottom: 15px;
    padding: 10px 8px;
    border: 1px dashed #bbbbbe;
    border-radius: 10px;
    box-shadow: 0 2px 6px 0 rgba(0, 0, 0, .13);
    display: flex;
    justify-content: center;
    align-items: center;
    .item-img{
      width: 42px;
      margin-right: 10px;
      img{
        display: block;
        width: 100%;
      }
    }
    .item-txt{width: calc(100% - 42px);
      .txt-top{
        .top-left{float: left;font-size: 14px;color: #333;line-height: 24px;}
        .top-right{float: right;
          p{font-size: 12px;color: #666;display: inline-block;line-height: 24px;vertical-align: top;}
          img{display: inline-block;width: 24px;}
        }
      }
      .txt-bottom{width: 94%;
        p{font-size: 12px;color: #666;line-height: 18px;text-align: justify;}
      }
    }
  }
}


</style>
